using System;
using Taimila.Entify;

namespace Taimila.Entify.SystemTests
{

	/// <summary>
	/// Provides few helper methods to make tests more readble and
	/// faster to write.
	/// </summary>
	public static class TestHelper
	{
		/// <summary>
		/// Get entity context for system test. Each returned context
		/// is it's own sandbox.
		/// </summary>
		public static EntityContext GetContext()
		{
			EntityContextSettings settings = new EntityContextSettings()
			{
				ContextName = System.Guid.NewGuid().ToString(),
				InMemory = true,
				EnforceValidationRules = false
			};

			return EntityContextFactory.GetContext(settings);
		}
	}
}
